﻿#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
using namespace std;

//int main(int argc, char* argv[])
//{
//	string strText = "How are you?";
//	string strSeparator = " ";
//	string strResult;
//	int size_pos = 0;
//	int size_prev_pos = 0;
//	while ((size_pos = strText.find_first_of(strSeparator, size_pos)) != string::npos)
//	{
//		strResult = strText.substr(size_prev_pos, size_pos - size_prev_pos);
//		cout << strResult << " ";
//		size_prev_pos = ++size_pos;
//	}
//
//	if (size_prev_pos != strText.size())
//	{
//		strResult = strText.substr(size_prev_pos, size_pos - size_prev_pos);
//		cout << strResult << " ";
//	}
//	cout << endl;
//	return 0;
//}
//4294967295
//18446744073709551615


int main()
{
	cout << (unsigned long long)-1;

	return 0;
}

class Solution {
public:
    int myAtoi(string str) {
        int flag = 1;//正负
        //找数字
        int pos1 = 0;
        while (str[pos1] <= '0' || str[pos1] > '9')
        {
            if (str[pos1] != ' ' && str[pos1] != '+' && str[pos1] != '-' && str[pos1] != '0')
            {
                return 0;
            }

            if (str[pos1] == '-')
            {
                flag = -1;
                if (str[pos1 + 1] < '0' || str[pos1 + 1]>'9')
                {
                    return 0;
                }
            }
            if (str[pos1] == '+' && (str[pos1 + 1] < '0' || str[pos1 + 1]>'9'))
            {
                return 0;
            }
            ++pos1;

            if (pos1 == str.size())
            {
                return 0;
            }
        }
        int pos2 = pos1 + 1;
        while (str[pos2] >= '0' && str[pos2] <= '9')
        {
            pos2++;
            if (pos2 == str.size())
            {
                break;
            }
        }

        //特殊情况
        if (pos2 - pos1 > (unsigned int)-1)
        {
            if (flag > 0)
            {
                return 2147483647;
            }
            else
            {
                return 2147483648;
            }
        }
        long long s = 0;
        long long i = 1;

        while (pos2 != pos1)
        {
            s += (str[pos2 - 1] - '0') * i;
            i *= 10;
            pos2--;
            if (s > (unsigned int)-1)
            {
                if (flag > 0)
                {
                    return 2147483647;
                }
                else
                {
                    return -2147483648;
                }
            }

        }
        return (int)(s * flag);
    }
};
